<!-- src/views/Home.vue -->
<template>
	<div class="home">
	  <Navbar />
	  <template v-if="isUserLoggedIn">
		<HomeLogin />
	  </template>
	  <template v-else>
		<HomeUnlogin />
	  </template>
	  <Footer />
	</div>
  </template>
  
  <script setup>
  import Navbar from "../components/Navbar.vue";
  import Footer from "../components/Footer.vue";
  import HomeUnlogin from "./Home/HomeUnlogin.vue";
  import HomeLogin from "./Home/HomeLogin.vue"
  
  import { computed } from 'vue';
  
  const isUserLoggedIn = computed(() => {
	const username = localStorage.getItem('username');
	return !!username;
  });
  </script>
  
  <style scoped>
  .home {
	display: flex;
	flex-direction: column;
	height: 100vh;
  }
  </style>
  